#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <ctype.h>
#include <stdbool.h>
#include <time.h>
//堆的定义
typedef struct Heap
{
    int* arr;
    int capacity;
    int size;
}Heap;
//堆的初始化
void HeapInit(Heap* php);
//堆的销毁
void HeapDestroy(Heap* php);
//堆的打印
void HeapPrint(Heap* php);
//堆的创建
void HeapCreate(Heap* php);
//堆的插入
void HeapPush(Heap* php,int x);
//堆的删除
void HeapPop(Heap* php);
//堆的根节点
int HeapTop(Heap* php);
//堆的节点个数
int HeapSize(Heap* php);
//判断堆是否为空
bool HeapEmpty(Heap* php);
//建立大堆,向上调整
void AdjustUp(int*arr,int child);
//建立大堆，向下调整
void AdjustDown(int*arr,int parent,int size);
//交换
void Swap(int* x,int* y);